Skip to content

Conversation

@mattmikolay
Copy link
Contributor

@mattmikolay mattmikolay commented Feb 3, 2026

Description

This PR updates the feed client so that it supports a new option mode, which can be set to either "compact" or "rich". When set to "compact", the activities and total_activities fields will not be present on feed items returned via the API, and the data field will not include nested arrays and objects.

By default, mode will be set to "compact". Thus, these changes constitute a minor version bump.

Note that neither activities nor total_activities are used by our in-app feed components out-of-the-box.

Todos

  • Merge knocklabs/switchboard#5467
  • Merge knocklabs/switchboard#5478

Checklist

  • Tests have been added for new features or major refactors to existing features.

Screenshots or videos

https://www.loom.com/share/db52cdeee7ad4407b3dd6ea907e86ce9

@linear
Copy link

linear bot commented Feb 3, 2026

@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
javascript-ms-teams-connect-example Ready Ready Preview, Comment Feb 3, 2026 10:19pm
javascript-nextjs-example Ready Ready Preview, Comment Feb 3, 2026 10:19pm
javascript-slack-connect-example Ready Ready Preview, Comment Feb 3, 2026 10:19pm
javascript-slack-kit-example Ready Ready Preview, Comment Feb 3, 2026 10:19pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: db04746

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@knocklabs/client Minor
@knocklabs/react-core Minor
@knocklabs/expo Minor
@knocklabs/react Minor
@knocklabs/react-native Minor
client-example Patch
guide-example Patch
@knocklabs/expo-example Patch
ms-teams-connect-example Patch
nextjs-app-dir-example Patch
nextjs-example Patch
slack-connect-example Patch
slack-kit-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor Author

mattmikolay commented Feb 3, 2026

@mattmikolay
Copy link
Contributor Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.45%. Comparing base (ebd4d6f) to head (db04746).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #851   +/-   ##
=======================================
  Coverage   68.45%   68.45%           
=======================================
  Files         193      193           
  Lines        8061     8062    +1     
  Branches     1065     1065           
=======================================
+ Hits         5518     5519    +1     
  Misses       2518     2518           
  Partials       25       25           
Files with missing lines Coverage Δ
packages/client/src/clients/feed/feed.ts 81.81% <100.00%> (+0.03%) ⬆️

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

} finally {
cleanup();
}
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate test for default compact mode behavior

Low Severity

The test "sets mode query param to compact by default" is nearly identical to "fetches feed data successfully" (lines 516-560). Both create a feed with empty options and verify that fetch() sends { archived: "exclude", mode: "compact" } params. The only difference is the existing test also validates the response entries count.

Fix in Cursor Fix in Web

"@knocklabs/react-native": minor
---

Initialize feeds in `"compact"` mode by default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like there may be a potential breakage if you upgrade without any code change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. As per Chris’s comment here:

We'll need to mark this as a breaking change, which for us means a minor release (pre 1.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants